package utils

import (
	"os"
	"path/filepath"
)

// GetExecDir returns self executable file's directory.
func GetExecDir() (string, error) {
	mypath, err := os.Executable()
	if err != nil {
		return "", err
	}
	dir := filepath.Dir(mypath)
	return dir, nil
}
